import request from '@/utils/request'


// 查询显示用数据
export function getAll(query) {
  return request({
    url: '/storage/smallCold/getAll',
    method: 'post',
    data: query
  })
}
//查询显示数据条数
export function getAllCount(query) {
  return request({
    url: '/storage/smallCold/getTotal',
    method: 'post',
    data: query
  })
}
// 查询父冷库信息
export function getParentCold() {
  return request({
    url: '/storage/bigCold/getParentCold',
    method: 'post'
  })
}
export function deleteSmallCold(subIds) {
  return request({
    url: '/storage/smallCold/'+subIds,
    method: 'post',
  })
}
//获得父冷库所有信息
export function getParentColdAll(query) {
  return request({
    url: '/storage/bigCold/getEveryParent',
    method: 'post',
    data: query
  })
}
//查询冷库类型信息
export function getColdType(query) {
  return request({
    url: '/storage/smallCold/getColdType',
    method: 'post',
    data: query
  })
}
//获得冷库管理员信息
export function getManagerByColdName(query) {
  return request({
    url: '/storage/bigCold/getManagerByColdName',
    method: 'post',
    data: query
  })
}
//测试
export function getManagerByParentId(query) {
  return request({
    url: '/storage/bigCold/getManagerByParentId',
    method: 'post',
    data: query
  })
}
//新增小冷库
export function addSmallCold(data) {
  return request({
    url: '/storage/smallCold/addSmallCold',
    method: 'post',
    data: data
  })
}
//获得单个小冷库
export function getSmallColdById(subId) {
  return request({
    url: '/storage/smallCold/'+subId,
    method: 'get',
  })
}
//修改小冷库
export function updateSmallCold(data) {
  return request({
    url: '/storage/smallCold/updateSmallCold',
    method: 'post',
    data: data
  })
}
// 查询岗位列表
export function listPost(query) {
  return request({
    url: '/system/post/list',
    method: 'get',
    params: query
  })
}

// 查询岗位详细
export function getPost(postId) {
  return request({
    url: '/system/post/' + postId,
    method: 'get'
  })
}

// 新增岗位
export function addPost(data) {
  return request({
    url: '/system/post',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updatePost(data) {
  return request({
    url: '/system/post',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delPost(postId) {
  return request({
    url: '/system/post/' + postId,
    method: 'delete'
  })
}
